# encoding: utf-8
# @project: st2111 
# @file: re_charset_ranges.py
# @time: 2023/4/6 15:16
# @author: abcque
# @license: (C) Copyright 2013-2021
# @contact: abcque@outlook.com
# @IDE: PyCharm
# @desc:

from chapter5.regular_expression.testre.re_test_patterns import test_patterns
if __name__ == "__main__":
    text = 'This is some text -- with punctuation.'
    patterns = [
        ("[a-z]+", "由所有小写英文字母组成的串"),
        ("[A-Z]+", "由所有大写英文字母组成的串"),
        ("[a-zA-Z]+", "由所有大小写英文字母组成的串"),
        ("[A-Za-z]+", "由所有大小写英文字母组成的串"),
        ("[A-Z][a-z]+", "以大写字母开头后面跟着 1个或者多个小写字母组成的串"),
    ]
    test_patterns(text=text, patterns=patterns)